/**
 *
 */
package com.aliyun.messagemgt.common.errorcode.push;


import com.aliyun.messagemgt.common.errorcode.IErrorCode;

/**
 * @author wucong
 *
 * 2018年4月17日
 */
public enum CommonErrorCode implements IErrorCode {
    //错误码
    COMMON_PARAM_INVALID(1001, "参数非法"),

    COMMON_DATABASE_TYPE_ERROR(1002, "数据库类型错误"),

    COMMON_PARAM_TYPE_ERROR(1003, "参数类型错误"),

    COMMON_PARAM_MISSING(1004, "参数缺失"),

    COMMON_IDENTIFIED_MISSING(1005, "身份缺失"),

    COMMON_IDENTIFIED_ERROR(1006, "身份错误,越权操作"),

    COMMON_OVER_AUTHORITY(1007, "越权操作,请申请权限后重试"),

    COMMON_WO_ERROE(1008, "流程发生错误"),

    COMMON_SLS_ERROR(1009, "SLS日志查询出错"),

    // MSG_SOURCE_INVAILD(2001, "消息源ID不可用"),
    MSG_SOURCE_INVAILD(2001, "发送任务配置不可用"),

    MSG_SOURCE_EXPIRE(2002, "消息源ID不在有效期内"),

    MSG_SOURCE_NOTNULL(2003, "msgSourceId 不为空"),

    ORG_MESSAGE_ID_NOTNULL(2004, "orgMessageId 不为空"),

    // MSG_SOURCE_ISNOTENABLED(2005, "消息源未启用"),
    MSG_SOURCE_ISNOTENABLED(2005, "发送任务配置未启用"),

    MONITOR_UNSUPPORTED_EXPIRE(3002,"告警渠道类型仅支持短信和邮件，暂不支持该种渠道类型"),

    MONITOR_UNAVAILABLE_MSG_SOURCE(3003,"当前告警，暂无可用的短信或邮件渠道"),

    MONITOR_EXPIRE(3001, "监控管理员信息格式出错"),

    SIGN_EXPIRE(3001, "获取绑定消息签名错误"),

    MSGLIST(4001, "消息体列表 msgList 不能为空"),

    MSGLIST_SIZE(4002, "消息体长度要在1-10之间"),

    MSG_RECORD_TITLE(4003, "消息标题 msgTitle 不能为空"),

    MSG_RECORD_DESCRIPTION(4004, "消息描述 msgDescription 不能为空"),

    MSG_RECORD_CONTENTS(4005, "消息体内容 contents 不能为空"),

    MSG_TEMPLATE_ISNULL(5001, "消息模板为空"),
    TETANT_USER_ISNULL(6001, "租户编码、用户id为空"),
    TETANT_USER_NOTEXIT(6002, "租户-用户不存在"),
    TETANT_SECRETKEY_NOTEXIT(6003, "租户密钥不存在"),

    RECEIVERANGE_IS_EMPTY(7001, "消息接收人为空"),
    RECEIVECHANNEL_IS_EMPTY(8001, "接收渠道为空"),
    FEIGN_EXCEPTION(9001,"feign接口调用异常"),
    SCENE_IS_NULL(10001,"场景-消息源不存在"),
    ;
    private int code;
    private String message;

    CommonErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String errName() {
        return message;
    }

    @Override
    public int errCode() {
        return code;
    }

    @Override
    public String errMsgTemplate() {
        return null;
    }
}
